package com.qfjy.controller;

import com.qfjy.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName DemoController
 * @Description TODO
 * @Author guoweixin
 * @Date 2023/2/24
 * @Version 1.0
 */
@Controller
@RequestMapping("weixin/demo")
@Slf4j
public class DemoController {

    @Autowired
    private DemoService demoService;


    @GetMapping("select")
    @ResponseBody
    public Object selectDemoById(@RequestParam("id") final Integer id){

        return demoService.selectByPrimaryKey(id);
    }
}
